topbanner_forum
  *

avatar image

Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
  • Tuesday May 17, 2022, 9:26 pm
  • Proudly celebrating 15+ years online.
  • Donate now to become a lifetime supporting member of the site and get a non-expiring license key for all of our programs.
  • donate

Author Topic: GingerTG - Custom command-line app for Telegra.ph (v0.1.0)  (Read 502 times)

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 509
  • Call me Vic!
    • View Profile
    • PublicDomain.is
    • Read more about this member.
    • Donate to Member
GingerTG

Custom command-line app for Telegra.ph



Made for c.gingerich from donationcoder.com.

Original thread: Windows command-line app for Telegra.ph

Release thread: GingerTG - Custom command-line app for Telegra.ph

Source code: GingerTG @ GitHub

Targets Microsoft .NET framework v4.5 (Native to Windows 8+)

Arguments

Create account:

  • -s, --short-name
  • -n, --author-name
  • -u, --author-iurl

Create page:

  • -k, --access-token
  • -t, --title
  • -n, --author-name
  • -u, --author-iurl
  • -c, --content
  • -r, --return-content

Edit page:

  • -k, --access-token
  • -p, --path
  • -t, --title
  • -c, --content
  • -n, --author-name
  • -u, --author-iurl
  • -r, --return-content

Get views:

  • -p, --path

Notes:

v0.1.0

  • Create account.
  • Create post.
  • Edit post.
  • Get views (total count).

Day #99, Week #14 @ April 09, 2022

==========

Release sponsors:
  • Jesse Reichler (A.K.A. Mouser from DonationCoder.com)
  • Max P.
  • Will you be our next supporter? :)

Support the creation of 52+ new public domain releases per year with your Donation via Paypal @ https://www.paypal.com/paypalme/victorvls or by becoming a Patron @ www.patreon.com/publicdomain.

Thanks & keep on rocking!

==========

Enjoy more free releases @ our website: https://publicdomain.is
My name's Victor but do feel free to call me Vic!

❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
I'm willing to devote full-time work hours to helping the fellows with my skills :Thmbsup:
Email/Paypal: publicdomainvicgmail.com
« Last Edit: April 09, 2022, 04:34 PM by publicdomain »

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 509
  • Call me Vic!
    • View Profile
    • PublicDomain.is
    • Read more about this member.
    • Donate to Member
Re: [DEV] GingerTG (Telegra.ph API)
« Reply #1 on: April 03, 2022, 03:54 PM »
Stack is: Fluent, Telegraph.Net, LiteDB and Json.NET.

Requirements:

... a command-line app to access all of the telegra.ph functions available in the API here https://telegra.ph/api

Thank you!

[EDIT]

To make even more simple would be a way to create an account, post and edit pages.
-c.gingerich (May 17, 2021, 03:01 PM)



Shaping as:

-a, --action <API method>

===

Create account:

-a createAccount

-s, --short-name

[-n, --author-name]

[-u, --author-url]

===

Create page:

-a createPage [-s, --short-name]

[-k, --access-token]

-t, --title

[-n, --author-name]

[-u, --author-url]

-c, --content

[-r, --return-content]

===

Edit page:

-a editPage [-s, --short-name]

[-k, --access-token]

-p, --path

-t, --title

-c, --content

[-n, --author-name]

[-u, --author-url]

[-r, --return-content]

===

-l, --list

List all managed accounts in the database.

===

-d, --dump <file path>

Dumps all accounts to passed file.

===

"Short name" being used as account key to auto-fill optional parameters when not provided.
My name's Victor but do feel free to call me Vic!

❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
I'm willing to devote full-time work hours to helping the fellows with my skills :Thmbsup:
Email/Paypal: publicdomainvicgmail.com
« Last Edit: April 06, 2022, 06:42 AM by publicdomain »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 746
    • View Profile
    • The Blind House
    • Donate to Member
Re: [DEV] GingerTG (Telegra.ph API)
« Reply #2 on: April 04, 2022, 10:17 AM »
Thanks Vic!

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 509
  • Call me Vic!
    • View Profile
    • PublicDomain.is
    • Read more about this member.
    • Donate to Member
Re: [DEV] GingerTG - Custom command-line app for Telegra.ph
« Reply #3 on: April 05, 2022, 07:06 PM »
Thanks Vic!

My pleasure Chris, the program creates accounts smoothly, first version supports both createPage and editPage with easy extensibility.

BTW Telegraph's post format seems quite "funky" (Node-based @ https://telegra.ph/api#Node).

What's your expectation here? Plain text or conversion? Thanks!
My name's Victor but do feel free to call me Vic!

❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
I'm willing to devote full-time work hours to helping the fellows with my skills :Thmbsup:
Email/Paypal: publicdomainvicgmail.com
« Last Edit: April 06, 2022, 07:47 AM by publicdomain »

c.gingerich

  • Supporting Member
  • Joined in 2011
  • **
  • Posts: 746
    • View Profile
    • The Blind House
    • Donate to Member
Re: [DEV] GingerTG - Custom command-line app for Telegra.ph
« Reply #4 on: April 06, 2022, 09:57 AM »
Vic,

I was just thinking plain text.

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 509
  • Call me Vic!
    • View Profile
    • PublicDomain.is
    • Read more about this member.
    • Donate to Member
Re: [DEV] GingerTG - Custom command-line app for Telegra.ph
« Reply #5 on: April 06, 2022, 10:52 PM »
GingerTG ALPHA 2022-04-06 is here:

▶ Direct download: GingerTG_v0-1-ALPHA20220406-0.zip

🏷 GitHub tag: https://github.com/p...v0.1-ALPHA20220406.0

I was just thinking plain text.

Great! Text is simply wrapped in a "p" element.



Do notice this is aiming to be a Telegra.ph API client + account manager.

If you just want an API client, we can keep it lean (i.e. no Database, just plain ol' manual argument passing).



Some examples.

Create account:

GingerTG.exe -a createAccount -s "GingerTG short name"

Create page:

GingerTG.exe -a createPage -k b968da509bb76866c35425099bc0989a5ec3b32997d55286c657e6994bbb -t "Page by GingerTG" -n "GingerTG.exe" -c "This is some sample content." -r true

Edit page:

GingerTG.exe -a editPage -k b968da509bb76866c35425099bc0989a5ec3b32997d55286c657e6994bbb -p Page-by-GingerTG-04-07 -t "Edited title" -n "New Ginger" -c "NEW & improved content here." -r true



It returns info on success:

Screenshot from 2022-04-06 23-42-18.png

This is the first ALPHA hence it's in a very malleable stage.

Please inform on what's your goal with the program; we can surely get you there! :Thmbsup:
My name's Victor but do feel free to call me Vic!

❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
I'm willing to devote full-time work hours to helping the fellows with my skills :Thmbsup:
Email/Paypal: publicdomainvicgmail.com

publicdomain

  • Moderator
  • Joined in 2019
  • *****
  • Posts: 509
  • Call me Vic!
    • View Profile
    • PublicDomain.is
    • Read more about this member.
    • Donate to Member
My name's Victor but do feel free to call me Vic!

❤️ Support on Patreon @ www.patreon.com/publicdomain
🎁 One-time Paypal @ www.paypal.com/paypalme/victorvls
I'm willing to devote full-time work hours to helping the fellows with my skills :Thmbsup:
Email/Paypal: publicdomainvicgmail.com
« Last Edit: April 09, 2022, 05:06 PM by publicdomain »