{"id":14064985,"url":"https://github.com/Mr-Destructive/crossposter","last_synced_at":"2025-07-29T19:33:50.671Z","repository":{"id":49168090,"uuid":"422623963","full_name":"Mr-Destructive/crossposter","owner":"Mr-Destructive","description":"Crosspost your articles to dev.to, codenewbie.org, medium.com and hashnode.com with a single shellscript / python package","archived":false,"fork":false,"pushed_at":"2023-07-25T15:35:38.000Z","size":99,"stargazers_count":9,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-27T05:51:50.398Z","etag":null,"topics":["bash","blogging","crossposting","markdown","python-cli","shell-script"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/crossposter/","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/Mr-Destructive.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2021-10-29T15:23:15.000Z","updated_at":"2024-12-12T09:49:31.000Z","dependencies_parsed_at":"2024-07-12T01:42:51.200Z","dependency_job_id":"4d6a4f9b-15b4-4357-b705-cd2d865a78e8","html_url":"https://github.com/Mr-Destructive/crossposter","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"purl":"pkg:github/Mr-Destructive/crossposter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Fcrossposter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Fcrossposter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Fcrossposter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Fcrossposter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Mr-Destructive","download_url":"https://codeload.github.com/Mr-Destructive/crossposter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Mr-Destructive%2Fcrossposter/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":267354189,"owners_count":24073762,"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","status":"online","status_checked_at":"2025-07-27T02:00:11.917Z","response_time":82,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["bash","blogging","crossposting","markdown","python-cli","shell-script"],"created_at":"2024-08-13T07:04:13.208Z","updated_at":"2025-07-29T19:33:50.364Z","avatar_url":"https://github.com/Mr-Destructive.png","language":"Python","funding_links":[],"categories":["Python"],"sub_categories":[],"readme":"## Crossposter\n\n\u003e Crosspost your articles to dev.to/medium.com/hashnode.com from the command line\n\n- Crossposter is a script(Python/BASH) to automate crossposting to platforms like dev.to, medium.com and hashnode.com. The script takes in markdown version of your post with a few inputs from you and posts it to those platforms. You would require a token/key for each of those platforms to post it from the command line.\n\nThere are two versions of the script:\n\n- [Python](#crossposter-python-script)\n- [Shellscript](#crossposter-shell-script) (BASH)\n\n\nThe actual script is still not perfect (has a few bugs). Though it posts on `dev.to` and `medium.com` easily, the `hashnode.com` is buggy as it parses the raw markdown into the post and doesn't render as desired. So, **its a under-development script**, fell free to raise any issues or PRs on the official GitHub repo.   \n\n## Crossposter Python Script\n\nThe python script initially is now a python package. You can essily install and configure it as per your requirements. \n\n[![PyPI version](https://badge.fury.io/py/crossposter.svg)](https://pypi.org/project/crossposter/)\n\nDependencies for the python script:\n\n- [requests](https://docs.python-requests.org/en/latest/user/install/#install)\n- [pyyaml](https://pypi.org/project/PyYAML/)\n- [python-frontmatter](https://pypi.org/project/python-frontmatter/)\n- [rich](https://pypi.org/project/rich/)\n\n\nRunning the script:\n\nMake sure you install the python package with pip or any other package manager like pipenv or poetry you would like: \n\n```\npip install crossposter\n\n# OR\n\npipenv install crossposter\n\n# OR\n\npoetry install crossposter\n\n# OR\n\npipx install crossposter\n\n```\n\n### Configuration\n\n- Create a config file `config.json` for customization\n- Create a folder for the output files\n\nInside the config file, you can specify the two attributes for the working of the script. The first is for generating the `canonical_url` for the post and the next is the output folder for the generated files for different platforms.\n\n```json\n{\n  \"blog_link\": \"https://www.meetgor.com/\",\n  \"output_folder\": \"crossout\"\n}\n\n```\n\nOne it is installed, you can then specify the markdown file which you want to use as a post with:\n\n```\ncrosspost \u003cfilename\u003e.md\n\n# OR with pipx\n\npipx run crossposter\n\n```\n\nThis will prompt you for a few things, if not provided in the frontmatter of the command. There will be need of inputs like `title`, `description`, `tags`, `status`, `cover-image`, etc. If you provide it in the frontmatter, there will be no input prompt. Once the input is taken or the frontmatter is picked, it will set those frontmatter for various publications automatically.\n\n```\n# post to dev.to\n\ncrosspost \u003cfilename\u003e.md --dev\n\n\n# post to codenewbie.org\n\ncrosspost \u003cfilename\u003e.md --cdb\n\n\n# post to medium.com\n\ncrosspost \u003cfilename\u003e.md --med\n```\n\n![image](https://user-images.githubusercontent.com/40317114/180605810-99a5616a-3524-4a10-97c4-e118763d9464.png)\n\n![image](https://user-images.githubusercontent.com/40317114/180605864-cbb83793-1944-4bfb-b95f-ef609e3e48e5.png)\n\nFor further help on CLI command, you can get the help argument\n\n```\ncrosspost --h\n```\n\n**ShellScript is no longer developed because of content parsing issues, it has been converted to a python package**\n\nThough some basic functions will work in shell script like simple frontmatter, devto and medium posting.\n\n## Crossposter Shell Script\n\nThe crossposter shell script is a file to be used from a linux/unix command line in a shell environment. The procedure to execute the file is as follows:\n\nRun the script on a bash interpreter with the command:\n\n```\nbash crosspost.sh\n```\n\nOR\n\n```\nbash crosspost.sh file_name.md\n```\n\nFor posting the article you need to provide the following details:\n\n## Front-Matter\n\n### Meta data about the post\n\n- Title of Post\n- Subtitle of Post\n- Publish status of post(`true` or `false`)\n- Tags for the post (comma separated values)\n- Canonical Url (original url of the post)\n- Cover Image (URL of the post's image/thumbnail)\n\nThis information is a must for `dev.to` especially the `title`. This should be provide in the same order as given below:\n\n```\n---\ntitle: The title of the post\nsubtitle: The description of your article\npublished: true\ntags: programming, anythingelse\ncanonical url: url of your original blog\ncover_image: coverimage_url\n---\n```\n\nThere is no need to enclose any of them with quotation marks. `Published` argument will be `true` if you want to publish it and `false` if you want to keep it in your Drafts.\n\nIn the demonstrations, we just need to enter the tokens once. The tokens will be stored locally in the `keys.txt` file and retrieved later within the script.\n\n### Posting on **dev.to**:\n\nPosting on dev.to requires their `API key` which can be generated by going on the [Dev Community API Keys](https://dev.to/settings/account/). From there you can generate a new key with any name you like. You just need to enter the key to CLI once or manually enter in the `keys.txt` file with the format `dev.to:key` on the first line. This will be used for the future cross-posting whenever you execute the shell script(`bash crosspost.sh`)\n\nYou can provide the [front matter](#front-matter) manually in your markdown file or you will be prompted for the input. So, that is all you will require for posting on dev.to from the Command line.  \n\nLets see the script in action \n\n![dev.to](https://gitlab.com/MR_DESTRUCTIVE/tblog-img/-/raw/main/devto.gif)\n   \nIf you want to add in more stuff to the post, you can check out the [DEV.to API docs](https://developers.forem.com/api#operation/createArticle) which is powered by [Forem](https://www.forem.com/), there a ton of options you can hook to the front-matter in the shellscript.\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMr-Destructive%2Fcrossposter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FMr-Destructive%2Fcrossposter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FMr-Destructive%2Fcrossposter/lists"}