{"id":20645504,"url":"https://github.com/pedrohenriques/projectmanager","last_synced_at":"2025-06-20T06:05:45.764Z","repository":{"id":91937466,"uuid":"69038273","full_name":"PedroHenriques/ProjectManager","owner":"PedroHenriques","description":"An easily customizable python program that makes it easy to create projects and files with predefined content.","archived":false,"fork":false,"pushed_at":"2017-01-23T16:53:57.000Z","size":24,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-17T12:31:40.649Z","etag":null,"topics":["file-manager","project-manager","scaffold-files"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/PedroHenriques.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-23T15:39:32.000Z","updated_at":"2017-05-07T16:39:38.000Z","dependencies_parsed_at":"2024-04-01T17:15:06.613Z","dependency_job_id":null,"html_url":"https://github.com/PedroHenriques/ProjectManager","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/PedroHenriques/ProjectManager","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PedroHenriques%2FProjectManager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PedroHenriques%2FProjectManager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PedroHenriques%2FProjectManager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PedroHenriques%2FProjectManager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PedroHenriques","download_url":"https://codeload.github.com/PedroHenriques/ProjectManager/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PedroHenriques%2FProjectManager/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260891107,"owners_count":23077907,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["file-manager","project-manager","scaffold-files"],"created_at":"2024-11-16T16:20:09.359Z","updated_at":"2025-06-20T06:05:40.753Z","avatar_url":"https://github.com/PedroHenriques.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Project Manager\n\nAn easily customizable python program that makes it easy to create projects and files with predefined content.\n\n## Instructions\n\n### Setup\n\n#### =\u003e Running the program and Batch file:\n\nIn order to run the program the file `main.py` must be called from the command line or terminal with the required parameters.  \n\nTo facilitate running the program, by being able to call it from any path, the repository comes with a **batch file**.  \nThis batch file will not only allow the program to be called from any path, as well as allow relative paths to be given as arguments.  \n\nBefore being able to use the batch file from any path, it must be placed in a directory that is part of the `PATH` environmental variable (in windows).  \nSecondly, in the batch file the line `set \"file_path=path\\to\\main.py\"` must be adjusted by changing `path\\to\\main.py` with the path to the `main.py` file.\nFinally, the name given to the batch file will be the name used in the command line to run the program.\n\n#### =\u003e Configuring/Customizing the Program\n\n**JSON files:**  \n\nEach action has a JSON file, named after the action, that contains all the data needed for that action's execution.  \nThe syntax of these files is as follows:\n- The data can be organized in as many levels deep as needed\n- The data that will be used in the action proper will, in general, treat keys as either file or directory names and their values as either the file or the directory's content.\n- Files have `strings` as values. These strings contain the file's content. An empty file should have an empty string as it's value.\n- Directories have `objects` as values. These objects contain the files and directories that should go inside this directory. An empty directory should have an empty object as it's value.  \n\nNOTE: The **help** action is an exception to these rules. For further information on the help action consult the related topic below.  \n\nExample:  \n\n```\n{\n\t\"python\" : {\n\t\t\".gitignore\" : \"\",\n\t\t\"main.py\" : \"print(\\\"Hello World.\\\")\",\n\t\t\"classes\" : {\n\t\t\t\"__init__.py\" : \"__all__ = [\\\"Application\\\"]\",\n\t\t\t\"Application.py\" : \"class Application :\\n\\t\\\"\\\"\\\"This is the application's main class.\\\"\\\"\\\"\\n\\n\\tdef __init__(self) :\\n\\t\\tpass\"\n\t\t},\n\t\t\"data\" : {}\n\t}\n}\n```\n\nIn this example, if the program is told to create a new python project (exact syntax further down), inside the project's directory the result would be:\n- An empty file named `.gitignore`\n- A file named `main.py` with content `print(\"Hello World.\")`\n- A directory named `classes`, inside of which is:\n\t- A file named `__init__.py` with content `__all__ = [\"Application\"]`\n\t- A file named `Application.py` with content\n\t```\n\tclass Application :\n\t\t\"\"\"This is the application's main class.\"\"\"\n\n\t\tdef __init__(self) :\n\t\t\tpass\n\t```\n- An empty directory named `data`\n\n**Special Keywords:**  \n\nThe content of files, created by both the file and the project actions, can have special keywords that will be replaced by dynamic or static data.  \n\nAll keywords are in the format `|!keyword{multiplier}[case]!|`.  \n- `keyword`: One of the supported keywords. See below for a list of global keywords, as well as, how to add your own.\n- `multiplier` (Optional): An integer (whole number) indicating how many times that keyword replacement should be inserted.\n- `case` (Optional): A tag indicating a specific case status for the keyword replacement. The supported tags are:\n\t- `uc`: insert the keyword replacement in UPPERCASE.\n\t- `lc`: insert the keyword replacement in lowercase.\n\t- `t`: insert the keyword replacement Capitalized.\n\nThe **global keywords** are:  \n\nKeyword | Replace Value | Supported Actions\n--- | --- | ---\ncopyright | copyright text\u003cbr\u003esee below for details on how to customize the text | project\u003cbr\u003efile\nproject_name | the new project's name | project\u003cbr\u003efile (1)\nfile_name | the new file's name | project\u003cbr\u003efile\nfile_type | the new file's type | project\u003cbr\u003efile\nproject_type | the new project's type | project\nno_www_domain | the new project's name, striped of any starting \"www.\" | project\n\n(1)  When creating a new file, the code will search the file's path for the first directory with a `.git` folder inside it. That directory will be treated as the file's project_name.\n\nAdding **custom keywords**:  \n\nAll custom keywords and their replacement strings are defined in the `keywords.json` file.  \nAny keywords added to this file will become usable in all the actions.\n\nIt is valid to use other keywords in the replacement string. \n\nThis is also where the copyright text is defined and can be customized.  \n\nNOTE: the code expects the keyword to have a string as a value in `keywords.json` and will replace it with an empty string if that is not the case.\n\n### Using the Project Manager\n\nThe syntax expected by the program depends on the desired action to be executed.  \nThe available actions are:  \n- project\n- file\n- help\n\n#### =\u003e Project Action:\n\nThe **project** action will create a new project directory, populated with any files, plus their content, and directories specified in the `project.json` file.  \n\nThe command line syntax for this action is `project location name type` where:\n- `location`: path to the directory where the project's folder should be created.\u003cbr\u003eIf running the program through the batch file a path relative to the working directory can be given, and a `.` can be used to indicate the working directory.\u003cbr\u003eIf running the program by calling main.py directly, then an absolute path must be given.\n- `name`: the name for the project's folder.\n- `type`: the type of project to be created.\n\nThe `type` of project to be created should match the data available in `project.json` and a `:` should be used to navigate the JSON's tree levels.  \n\n**Example:**  \n\nFor a `project.json` file with the following structure:\n```\n{\n\t\"website\" : {\n\t\t\"php\" : {\n\t\t\t...\n\t\t},\n\n\t\t\"cs\" : {\n\t\t\t...\n\t\t}\n\t},\n\n\t\"python\" : {\n\t\t...\n\t}\n}\n```\n\nAnd assuming the working directory in the command line is `C:\\work`:\n- to create a new `php` project named `personal_site` the following command would be used `project . personal_site website:php`.\n- to create a new `python` project named `calculator` the following command would be used `project /portfolio calculator python`.\n\n#### =\u003e File Action:\n\nThe **file** action will create a new file, with the content relevant to its extension, as specified in the `file.json` file.  \n\nThe command line syntax for this action is `file location name type [-flags]` where:\n- `location`: path to the directory where the file should be created.\u003cbr\u003eIf running the program through the batch file a path relative to the working directory can be given, and a `.` can be used to indicate the working directory.\u003cbr\u003eIf running the program by calling main.py directly, then an absolute path must be given.\n- `name`: the name for the file (without the extension).\n- `type`: the type of file to be created.\n- `flags`: optional argument with the desired flags. The supported flags are:\u003cbr\u003e`f`: forces the creation of the file by creating any directories in the given path that don't exist.\u003cbr\u003e`o` : if a file with the same path already exists, it will be overwritten.\n\nThe `type` of file to be created should match the data available in `file.json` and a `:` should be used to navigate the JSON's tree levels.\n\nThe code expects `file.json` to have a key `extension` with a string value containing the file's extension and a key `content` with a string value containing the file's content.  \n\n**Example:**  \n\nFor a `file.json` file with the following structure:\n```\n{\n\t\"class\" : {\n\t\t\"php\" : {\n\t\t\t\"extension\" : \"php\",\n\t\t\t\"content\" : \"...\"\n\t\t},\n\n\t\t\"python\" : {\n\t\t\t\"extension\" : \"py\",\n\t\t\t\"content\" : \"...\"\n\t\t}\n\t},\n\n\t\"js\" : {\n\t\t\"extension\" : \"js\",\n\t\t\"content\" : \"...\"\n\t}\n}\n```\n\nAnd assuming the working directory in the command line is `C:\\work`:\n- to create a new `php class` file named `Player` the following command would be used `file /game Player class:php`.\n- to create a new `js` file named `main` the following command would be used `file /site/assets main js`.\n\n#### =\u003e Help Action:  \n\nThe **help** action will display help information about the program, as specified in the `help.json` file.  \n\nThe command line syntax for this action is `help [topic]`.  \nIf no topic is given, the list of topics will be displayed, otherwise detailed information about the given topic will be displayed.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrohenriques%2Fprojectmanager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpedrohenriques%2Fprojectmanager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpedrohenriques%2Fprojectmanager/lists"}