Git Product home page Git Product logo

ecto1's Introduction

ecto1

A downloader/scraper/static-site-maker for Ghost blogs

Why?

Because I wanted a way to have a nice, modern WYSIWYG blog editing experience combined with the speed and security of a static website. (And I wanted to keep the Ghost themes intact instead of re-implementing them in a static site generator - so the Content API is not used.)

How do I use it?

With Python 3 and environment variables.

Here's the help text from the script:

ecto1.py: the Ghost blog downloader/scraper/static-site-maker
See https://github.com/arktronic/ecto1 for license info, etc.

Usage is all based on setting environment variables:
ECTO1_SOURCE=http://internal-url.example.net ECTO1_TARGET=https://public-url.example.com python3 etco1.py

If the Ghost site is in private mode, specify the password and the private RSS link:
ECTO1_PRIVATE_PASSWORD=abcd1234 ECTO1_PRIVATE_RSS_URL=http://internal-url.example.net/acbacbacbacbabcbabcbacabb/rss ...

If the Ghost site is behind a pre-authentication gateway, specify its POST URL and Base64-encoded POST data:
ECTO1_PRE_AUTH_URL=http://authentication.example.net/login ECTO1_PRE_AUTH_POST_DATA="dXNlcm5hbWU9aGVsbG8mcGFzc3dvcmQ9d29ybGQ=" ...

IMPORTANT: It is assumed that you own the rights to the Ghost site being downloaded. No throttling is implemented.

Don't forget to run pip install -r requirements.txt first.

ecto1's People

Contributors

arktronic avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

kalimero666

ecto1's Issues

Missing fonts warning when generating local static site of ghost blog

Hi Sasha,
I was able to successfully generate the static site of my ghost blog here - https://github.com/QubitQuants/qubitquants.github.io

But I encounter some font missing warnings, using dawn ghost theme, how do I deal with this:

(base) dilip.rajkumar@diliprajkumar-MacBook-Pro Documents % cd QQblog
(base) dilip.rajkumar@diliprajkumar-MacBook-Pro QQblog % python3 ecto1.py
ecto1.py
Private mode: OFF
Pre-auth: OFF
http://localhost:2368/sitemap.xml
/opt/miniconda3/lib/python3.9/site-packages/bs4/builder/__init__.py:545: XMLParsedAsHTMLWarning: It looks like you're parsing an XML document using an HTML parser. If this really is an HTML document (maybe it's XHTML?), you can ignore or filter this warning. If it's XML, you should know that using an XML parser will be more reliable. To parse this document as XML, make sure you have the lxml package installed, and pass the keyword argument `features="xml"` into the BeautifulSoup constructor.
  warnings.warn(
http://localhost:2368/sitemap-pages.xml
http://localhost:2368/
http://localhost:2368/about/
http://localhost:2368/#/portal/signup
http://localhost:2368/metatrader-5/
http://localhost:2368/coming-soon/
http://localhost:2368/tag/news/
http://localhost:2368/#/portal/
http://localhost:2368/assets/built/screen.css?v=c3f43a7e81
http://localhost:2368/images/default-skin.png
WARNING: unable to download "http://localhost:2368/images/default-skin.png": HTTP Error 404: Not Found
http://localhost:2368/images/default-skin.svg
WARNING: unable to download "http://localhost:2368/images/default-skin.svg": HTTP Error 404: Not Found
http://localhost:2368/images/preloader.gif
WARNING: unable to download "http://localhost:2368/images/preloader.gif": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-regular.woff2
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-regular.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-regular.woff
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-regular.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-700.woff2
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-700.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-700.woff
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-700.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-800.woff2
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-800.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-800.woff
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-800.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-italic.woff2
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-italic.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-italic.woff
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-italic.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-700italic.woff2
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-700italic.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/mulish-v10-latin-700italic.woff
WARNING: unable to download "http://localhost:2368/fonts/mulish-v10-latin-700italic.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-regular.woff2
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-regular.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-regular.woff
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-regular.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-700.woff2
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-700.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-700.woff
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-700.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-italic.woff2
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-italic.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-italic.woff
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-italic.woff": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-700italic.woff2
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-700italic.woff2": HTTP Error 404: Not Found
http://localhost:2368/fonts/lora-v23-latin-700italic.woff
WARNING: unable to download "http://localhost:2368/fonts/lora-v23-latin-700italic.woff": HTTP Error 404: Not Found
http://localhost:2368/rss/
http://localhost:2368/public/cards.min.css?v=c3f43a7e81
http://localhost:2368/public/cards.min.js?v=c3f43a7e81
http://localhost:2368/public/member-attribution.min.js?v=c3f43a7e81
http://localhost:2368/assets/built/main.min.js?v=c3f43a7e81
http://localhost:2368/author/qubit/
http://localhost:2368/content/images/size/w150/2022/11/ProfilePic.jpg
http://localhost:2368/content/images/size/w960/2022/11/MT5-Bot.png
http://localhost:2368/content/images/size/w400/2022/11/MT5-Bot.png
http://localhost:2368/content/images/size/w750/2022/11/MT5-Bot.png
http://localhost:2368/content/images/size/w1140/2022/11/MT5-Bot.png
http://localhost:2368/about-us/
http://localhost:2368/sitemap-posts.xml
http://localhost:2368/sitemap-authors.xml
http://localhost:2368/sitemap-tags.xml
http://localhost:2368/robots.txt
http://localhost:2368/favicon.ico
Done. Contents have been downloaded into: /Users/dilip.rajkumar/Documents/QQblog/public

NOT AN ISSUE - Thanks

Sasha, just wanted to say thanks!

I wasted a lot of time trying to find a simple smooth and effective method to convert a Ghost instance running locally to static pages. However, without all that searching and frustration, I would not have found your little gem!

Since I am running on Windows, the Environment Variables were set in the UI.
I already had python installed and once your repo was cloned, it took me less than 5 min to have my local ghost served through Cloudflare pages.

Thanks a lot man!

How to use `ecto1` package to publish ghost blog to github pages

Hello Ark,
I am trying to push a static version of my ghost blog to GitHub pages and I came across your ecto1 repo which says it can do static site generation. I did ghost install local and setup my ghost blog on my local Mac computer. How do I push the static version of this ghost blog from my Mac to Github pages (repo) using ecto1 ?

Most blogs only write about ghost static site generation using a packaged called buster running on python2.7 which is deprecated. Could you kindly share any tutorial or documentation to achieve this using ecto1?

Best Regards,
Dilip

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.