{"id":23854063,"url":"https://github.com/lewangdev/montanus","last_synced_at":"2026-05-26T06:30:16.320Z","repository":{"id":148141953,"uuid":"144816152","full_name":"lewangdev/montanus","owner":"lewangdev","description":"A pythonic CDN Tool for old template engine based projects, such as JSP/PHP/ASP","archived":false,"fork":false,"pushed_at":"2018-08-24T02:56:08.000Z","size":42,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-02T23:51:55.905Z","etag":null,"topics":["cdn","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/lewangdev.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-08-15T06:46:03.000Z","updated_at":"2018-08-24T03:11:42.000Z","dependencies_parsed_at":"2023-06-26T01:52:35.400Z","dependency_job_id":null,"html_url":"https://github.com/lewangdev/montanus","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fmontanus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fmontanus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fmontanus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lewangdev%2Fmontanus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lewangdev","download_url":"https://codeload.github.com/lewangdev/montanus/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240145107,"owners_count":19755017,"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":["cdn","python"],"created_at":"2025-01-02T23:51:39.428Z","updated_at":"2026-05-26T06:30:15.823Z","avatar_url":"https://github.com/lewangdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"A Tool for Static Resources Deployment\n===============\n\n## Principle\n\n### Binary Resources First\n\nSupported Binary File Types：\n\n```python\n __binary_file_exts = [\n        '.png', '.bmp', '.gif', '.ico',\n        '.jfif', '.jpe', '.jpeg', '.jpg'\n    ]\n\n```\n\n### Text Files Parsed Recursively\n\nSupported Text File Types：\n\n```python\n  __text_file_exts = ['.css', '.js']\n```\n\nExtension Name of Template Files：\n\n```python\n  __templates_exts = ['.jsp', '.html']\n```\n\n#### Example\n\nindex.html\n\n```html\n\u003chtml\u003e\n    \u003chead\u003e\n        \u003clink rel=\"apple-touch-icon\" sizes=\"144x144\" href=\"/apple-touch-icon-144.png\"\u003e\n        \u003clink href=\"layout.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\"\u003e\n    \u003c/head\u003e\n    \u003cbody\u003e\n        \u003cimg src=\"li.png\" alt=\"li\" /\u003e\n        \u003cscript type=\"text/javascript\" src=\"jquery.js\"\u003e\u003c/script\u003e\n        \u003cscript type=\"text/javascript\"\u003e\n            var dialog = require('dialog/dialog.js');\n            dialog.alert(\"I am a dialog!\");\n        \u003c/script\u003e\n    \u003c/body\u003e\n\u003c/html\u003e\n```\n\nlayout.css\n\n```css\n.bg{background: url(bg.png)}\n```\n\n#### Recursive Depth\n\nindex.html \u0026#62; layout.css \u0026#62; bg.png\n\nindex.html \u0026#60; layout_987cb34ea2.css \u0026#60; bg_087b4e5f67.png\n\n\n### CDN\n\nCSS\n\n```css\n@import url(path)\nbackground:url(path)\nbackground-image:url(path)\nfilter[Only IE]\n```\n\nJS\n\n* AMD require\n* Please avoid using `document.write img`\n\nHTML, such as JSP, PHP etc.\n\n```html\n\u003cscript src=\"path\"\u003e\n\u003clink href=\"path\"\u003e\n\u003cimg src=\"path\"\u003e\n```\n\n## HowTo\n\n-----------\n\n### Installation\n\n-----------\n\n```shell\nsudo apt-get install python-pip\ngit clone https://github.com/thisiswangle/montanus.git\ncd montanus\nsudo pip install .\n```\n\n\n### Usage\n\n-----------\n\n```shell\n(montanus)➜  montanus git:(master) ./montanus.py -h\nMontanus.\n\nUsage:\n    montanus.py \u003ctemplates_path\u003e [--with-static-files-path=\u003cp\u003e | --with-protocol=\u003cp\u003e | --with-domains=\u003cl\u003e | --with-md5-len=\u003cl\u003e | --with-md5-concat-by=\u003cc\u003e | --with-conf=\u003cf\u003e | -d]\n    montanus.py (-h | --help)\nmontanus.py (-v | --version)\n\n    Options:\n    -h --help                          Show this help message\n    -v --version                       Show version\n    -d --delete                        Delete all sources\n    --with-static-files-path=\u003cp\u003e       Set static file path. If not set, the value will be the same as template_path\n    --with-protocol=\u003cp\u003e                Set protocol [Default: http]\n    --with-domains=\u003cd\u003e                 Set CDN domains[Default: ]\n    --with-md5-len=\u003cl\u003e                 Set MD5 Length [Default: 10]\n    --with-md5-concat-by=\u003cc\u003e           Set MD5 concatenator [Default: -]\n    --with-conf=\u003cf\u003e                    Set config file path\n\n```\n\n```shell\nmontanus 'awesome_project/src/main/webapp'\n```\n    \n### How to work with Jenkins\n\n-----------\n\nAdd this code before building process\n\n```shell\nWEB_HOME=${WORKSPACE}/src/main/webapp\necho \"Goto ${WEB_HOME} to build a version tag for all static files\"\nmontanus ${WEB_HOME} --with-domains=s0.awesome-domain.com,s1.awesome-domain.com\n```\n\nAdd this code after building\n\n```shell\npwd\ngit clean -df\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewangdev%2Fmontanus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flewangdev%2Fmontanus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flewangdev%2Fmontanus/lists"}