Giter Club home page Giter Club logo

postybirb-plus's Introduction

PostyBirb+

A rewrite of the desktop application PostyBirb using TypeScript, NestJS, React, and Electron.

Shared interfaces, models, etc. between the UI and Backend

Electron-App (backend)

ElectronJS + NestJs that handles running the local server and the desktop application itself. This is where all posting magic happens.

React code that handles UI of the application displayed in the desktop application.

Configuring for local development

To set up a local copy of PostyBirb for development:

  1. clone this repository and cd into it.
  2. npm run contribute to install dependencies in every folder
INSTALL TROUBLESHOOTING

Temporary until react-scripts will be replaced with vite

Common

If something does not work and you can't determine where error happened (since there is 3 parallel scripts) run npm run contribute:debug

ERR_OSSL_EVP_UNSUPPORTED

Error
Error: error:0308010C:digital envelope routines::unsupported
  at new Hash (node:internal/crypto/hash:71:19)
  at Object.createHash (node:crypto:133:10)
  at module.exports (ui\node_modules\webpack\lib\util\createHash.js:135:53)
  at NormalModule._initBuildHash (ui\node_modules\webpack\lib\NormalModule.js:417:16)
  at ui\node_modules\webpack\lib\NormalModule.js:452:10
  at ui\node_modules\webpack\lib\NormalModule.js:323:13
  at ui\node_modules\loader-runner\lib\LoaderRunner.js:367:11
  at ui\node_modules\loader-runner\lib\LoaderRunner.js:233:18
  at context.callback (ui\node_modules\loader-runner\lib\LoaderRunner.js:111:13)
  at ui\node_modules\babel-loader\lib\index.js:55:103
  at process.processTicksAndRejections (node:internal/process/task_queues:95:5) {    
  opensslErrorStack: [ 'error:03000086:digital envelope routines::initialization error' ],
  library: 'digital envelope routines',
  reason: 'unsupported',
  code: 'ERR_OSSL_EVP_UNSUPPORTED'
}

To fix this error, replace react-scripts build with react-scripts --openssl-legacy-provider build

Start

npm run start

Contribution Guide

Pending

If you are interested in adding features or websites to the application, please let me know.

PR branch is develop.

Dont forget to npm run test --prefix electron-app before pull

Also run npm run codestyle if you haven't installed eslint and prettier extensions!

postybirb-plus's People

Contributors

aneillans avatar askmeaboutlo0m avatar charmander avatar cultpony avatar dependabot[bot] avatar floogulinc avatar isofrieze avatar kelketek avatar leaftail1880 avatar mvdicarlo avatar spottedsqueak avatar warpkaiba avatar xenoyia avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

postybirb-plus's Issues

error when a posting on pixiv

"errors": [
"

Invalid parent folder 0
\n",
"SyntaxError: Unexpected token < in JSON at position 0\nSyntaxError: Unexpected token < in JSON at position 0\n at JSON.parse ()\n at Pixiv. (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/main.js:1:4533740)\n at step (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/main.js:1:554091)\n at Object.next (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/main.js:1:554196)\n at fulfilled (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/main.js:1:552860)\n at ZoneDelegate.invoke (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/polyfills.js:1:7275)\n at Object.onInvoke (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/main.js:1:202740)\n at ZoneDelegate.invoke (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/polyfills.js:1:7215)\n at Zone.run (file:///C:/Users/ARCHIN1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/polyfills.js:1:2395)\n at file:///C:/Users/ARCHIN~1/AppData/Local/Temp/2H6I6CCfVwB2aamzCL6dxVRmbSB/resources/app.asar/dist/polyfills.js:1:14657",
"
Invalid parent folder 0
\n",
"Error: read ECONNRESET\nError: read ECONNRESET\n at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)",
"Error: read ECONNRESET\nError: read ECONNRESET\n at TLSWrap.onStreamRead (internal/stream_base_commons.js:209:20)"
]
},
"success": false,
"created": "Mon, 29 Jan 2024 21:39:04 GMT"
}

DeviantArt -- Status updates do not preserve newlines

When posting from PB+ and posting a "status update" on DeviantArt, any newlines seem to be stripped. Posting the same thing at the same time to other places seems fine.

The status update format does support newlines as I can go back and modify the update that PB made, and add the missing newlines to it.

Request: Patreon - Support for other post types

TL;DR: Add support for the Link, Video, Audio, and Livestream post types under Patreon for submissions.


Currently, Postybirb+ supports posting Text and Image posts on Patreon, from what I can tell. Providing support for posting the other post types available through Patreon's submission panel (Video, Livestream, Audio, and Link) would be a nice feature to have. I would suggest adding this as a drop-down selection option in the edit screen for submissions in Postybirb+ and, for post types that require additional information (I.e., the URL for a link type post), include additional fields based on the selected post type.

Personally, I would primarily be making use of the 'Link' post type due to my use of Postybirb in cross-posting writing and worldbuilding updates to various social platforms that link back to the main website I post my written work onto.

Note: I'm not including the 'Poll' type as this would probably be better off as a separate feature, due to other platforms also having polls - Also, cloning the same poll across multiple platforms isn't the best idea as it can skew results if some of your followers use multiple platforms to vote.

Derpibooru/Furbooru: Switch to Markdown

I'm copying this issue here as well, as this seems to be relevant to both projects.

Original issue text:

Derpibooru and Furbooru have deprecated and removed the old Textile syntax, and have switched to Markdown. This causes all posts created by PostyBirb with any kind of text formatting for description to appear broken. The formatter for both sites would need to be updated.

Both use the exact same version of CommonMark-GFM with some additions and alterations. You may use this guide as reference.

SESSION_PASSWORD_NEEDED when adding Telegram account

When trying to connect PostyBirb to an account that has 2FA enabled Telegram responds with SESSION_PASSWORD_NEEDED
image

Workaround is to disable 2FA, then PostyBirb is able to successfully connect.

I'm not sure if you can fix it on your side but could you add a helpful error message so the user knows what to do?

Mastodon image posting; dimensions not support not being resized

Posting an image of a not supported dimension to a Mastodon instance is not being picked up and resized despite being configured to resize before posting.

Image size is:
Height: 5232
Width: 3904

Error from instance:
"response": {
"website": "Mastodon",
"time": "21/03/2023, 09:28:31",
"message": "Unknown Error",
"error": 422,
"additionalInfo": "Verify upload\n\n{\n "error": "3904x5232 images are not supported"\n}"

Would appear that resize was not completed before the upload was executed. Is resize only being checked against size limit and not the dimensions?

Mastodon: mark media as "Sensitive" when adding Content Warning

In brief

  • PostyBirb+ should mark images as Sensitive when a Content Warning is added
    • Matches Mastodon, which selects Mark media as sensitive when adding a Content Warning
    • Reduces confusion between the Mastodon UI (which does this) and PostyBirb+ (which does not)
    • Saves moderators headaches when well-meaning users post unmarked sensitive content (personally seen it twice)

Details

Here's Mastodon's web UI showing how images are automatically marked as sensitive when a content warning is added, including preventing unchecking it:

Mastodon-web-UI-CW-and-Sensitive.mp4

Screen recording of the Mastodon web UI showing toggling the CW button on a post with an image attached. Mark media as sensitive is checked when toggling on CW, and it cannot be unmarked as sensitive until toggling off CW.

If desired, PostyBirb+ could default to enabling Sensitive when a Content Warning is added but still allow removing the Sensitive flag manually. I'd also be happy with just copying Mastodon's approach.

Mastodon Tags not posting

Tags are not posting to Mastodon; these should be generated and added to the bottom of the post body for Public and Unlisted posts.

Unable to load chunks exported from FA Gallery Downloader

I’ve downloaded my gallery (darhan) with FA Gallery Downloader and exported the data for Postybirb.

Importing to Postybirb+ 3.1.23 worked when I tested back in early July, but now, with 3.1.26, all I get is error messages flashing at the top of the screen and a notification that zero files were imported.

2023-09-11_060229

Any way I can fix this?

Cannot upload to Itaku Gallery with 3.1.25 update

Updated to version 3.1.25 and now I cannot seem to upload to Itaku (it seems to freeze and then fail with unknown reason)

Downgraded to 3.1.24 and PostyBirb uploads to Itaku without any issues.

On version 3.1.25 it will upload in the notification tab (and make a post) but will not upload to the gallery.

Regression: Incorrect limits applied for Pleroma/Akkoma

In #247 I fixed the existing Mastodon website type to support how Pleroma and Akkoma don't have specific resolution limits but just total file size limits. In #262 and #266 a specific Pleroma website type was added but this seems to enforce some arbitrary limits that are irrelevant for Pleroma and Akkoma. Looking at https://github.com/mvdicarlo/postybirb-plus/blob/master/electron-app/src/server/websites/pleroma/pleroma.service.ts:

  • It incorrectly sets the max height and width to 4000 even though these Pleroma/Akkoma do not limit the resolution of uploaded files at all. There should be no resolution limit for Pleroma/Akkoma.
  • It incorrectly sets the max file size to 16 mb for all Pleroma/Akkoma instances because its trying to use the Mastodon specific configuration/media_attachments object from the API which doesn't exist on Pleroma/Akkoma servers instead of the upload_limit provided by the Pleroma instance info API.
  • It incorrectly sets the max number of attachments per post to 4 when the server doesn't support the max_media_attachments field in the instance info API (as is the case with older versions of Pleroma and all versions of Akkoma). For these instances there is no limit on number of attachments per post.

I have tested and confirmed these with my own Akkoma instance.
PostyBirb+_eNRniLXHaD

Newgrounds: All uploads are downscaled to 600x600

Around October 16th, Newgrounds started shrinking all Postybirb uploads to 600x600 px. This has been reported by multiple users on the Postybirb discord.

This occurs even if the "Downscale Images" PostyBirb setting is set to false. Uploading images through Newgrounds' website does not shrink the images, this only affects Postybirb.

The full scale images can be reuploaded by editing the Newgrounds submission.

Roadmap: Make project more contribution-friendly

When i first tried to contribute, i ran into a lot of problems:

  1. Warnings about deprecated and vulnerable dependencies during installation
  2. SSL error when running npm run make from the project root
  3. Confusing installation/build/run scripts
  4. Different typescript versions in different folders
  5. Different linters, code styles, etc.

I spent a lot of time to figure this out and I don't want anyone else to suffer so much, so I present my roadmap of changes that I will carry out so that this does not happen again (ill open pr for each of them and add link, when pr is closed ill mark task as done):

  • #208
    Replace outdated npm-run-all with npm-run-all2 which also has less dependencies.
  • #212
    Make a single version of typescript, eslint and prettier for all folders, update configurations and plugins.
  • #225
    Separate pr because it will be big. Not a problem for pr's made before new codestyle, because it can be fixed by one command
  • #228

Twitter shortcode broken on twitter

I'm using 3.1.20 on Windows 10

When posting an image on Twitter using the tw shortcode:

{tw:something}

Instead of it showing as "@something", it shows as "@/something", which breaks the tag entirely.

However, the short code does seem to work on other sites (checked DeviantArt, FurAffinity, Mastodon and Twitter). So I wonder if it's a Musky issue?

Weasyl: Checking the "Notify" setting disables Notifications

After noticing missing Notifications for Submissions of some Artists on Weasyl I got in touch with one of them and they told me they're using PostyBirb+

With some test submissions of my own I found that the "Notify" setting in PostyBirb+ seems to do the exact opposite of what it implies: checking it disables notifying followers, unchecking enables it.

I think two things should change:

  • change the default to off
  • change the label so that it is clear checking it will disable Submission Notifications

Telegram login is broken

Hello! I was just recently logged out of telegram on postybirb, and when trying to log back in, telegram shows a successful login but Postybirb is completely stuck.

Postybirb can't log into Itaku

Postybirb seems unable to stay log into Itaku. I've tried multiple times, but nothing seems to keep the account logged in.

Patreon is missing "Title" field

Most websites (Itaku, Mastodon, etc) let you specify a title. Patreon does not.

The title specified in the "Defaults" section is used for Patreon, and cannot be overridden.

Request: Show Mastodon post URLs in log after upload

PostyBirb usually shows the post URLs in the log after uploading, except for Mastodon (and Pillowfort, from what I've tested so far).

The URL can be helpful for sharing, or for checking if everything was uploaded correctly.

Unable to link Fur Affinity account

as the title states im running into issues with linking my FA account to postybirb+.
it constantly displays green light but prompts "not logged in" inside the account tab.

0PpmOIU

mirror: https://i.imgur.com/0PpmOIU.png

i tried hitting the clip button to reset my cookies, nothing happens after logging into the account again inside the small browser window. the same issue persists.

sidenote: i've uploaded over 700 submissions, so it cannot be an issue anything regarding account limitations.

Where Does Postybirb+ Store Created Post

As the title states, I was wondering where and in what formate does Postybirb+ store submissions you have written. I would like to be able to back them up as I have a lot of posts written and in the queue.

Request: Add alt text per file on Mastodon

Currently it seems that alt text is either only added to the first / primary file when posting multiple files to Mastodon. [1]

Each file should have it's own alt text field to apply different text to each attachment.

[1] This is my assumption based on there only being only one alt text field even when attaching multiple files, I did not actually send a post to find out whether the same text is applied to all or only to the first.
If there already is a way to apply different alt text per file in postybirb I would be happy to learn how to do it.

Postybirb Mastodon does not work with Pleroma and possibly other non-Mastodon ActivityPub instances

When I try to post anything with Postybirb 3.0.46 to a Pleroma instance using Postybirb's Mastodon interface, posts don't show up. A friend on the other hand had issues logging into his Soapbox-FE Pleroma instance and I'm not sure if it works with Misskey or not. As there are a lot of non-Mastodon fediverse instances out there, I feel it should either be supported or noted that it is in fact Mastodon only.

Request: Cohost support

Just putting this here as a request note more than anything, as seen it around a lot.

Found the library that uses the current Cohost private api and am reviewing it with the plan to put a PR together when I get time. depending on demand, although am conscious this one could be a potential regular breaking one due to it not being fully stable.

Itaku always shares to feed, No visibility setting in UI

  • When posting to Itaku, images always share to feed regardless of if shareOnFeed is true or false.
  • There is nowhere to set the visibility to Unlisted or Profile Only in the UI.

These are two separate issues I've run into. I managed to edit the database to successfully post an unlisted image, but it always ends up shared to the feed anyway.

Posting to BlueSky returns an `at://` URI instead of an `https://` link

Already discussed on the Discord, but thought I'd make an issue too for tracking purposes.

The problem


When posting to BlueSky their API currently responds with an AT Protocol URI, which obviously can't be opened by the average user in their browser, instead of the normal HTTPS link that people would be expecting.

image

This becomes further problematic when this is provided as a source to e621 resulting in an unclickable link, which requires making an API tool to figure out where it was posted.

image

To mitigate this problem for now, I'm running a bot that automatically resolves the URIs, but a permanent solution would be much better.

The solution?


If the API itself won't give us the URL, we're left with no option but to construct it ourselves. We know the last part of the URL is the unique identifier for the post - but identifying the author is the harder part.

The hackiest solution - the user is already authenticated with PostyBirb, so we should know their handle they logged in with, and should be able to construct a URL with the format https://bsky.app/profile/${user_handle}/post/${post_id}. Currently untested: Is the user able to change their handle on BlueSky without killing their session within PostyBirb, resulting in incorrect source URLs?

A safer solution, though requiring an additional API call, would be to query the API for the handle of the DID found in the URI with agent.getProfile({actor: "did:plc:xxxx"}) which will respond with various information including the handle that we need to construct the URL like above.

Unfortunately neither solution is future-proof as it would be hardcoding the links to the bsky.app domain when it will eventually become federated, I imagine a lot of code is already going to need re-implementation for that change so this might not be a big deal.

Other discussion


Unable to post to Fur Affinity and Ko-fi

I wasn't able to find anything at all about this, but apologies if this has already been solved before. I just started using this app (and its great btw!)

I made a submission and entered DeviantArt, Tumblr, Fur Affinity, Newgrounds, and Ko-fi as websites to be posted to. DeviantArt and Tumblr worked fine, but Fur Affinity and Ko-fi entirely failed.

For each of the failed websites I got this error:
this.formatTags(...).join is not a function
...this error also appeared for Newgrounds, but while I was writing this issue, I checked my accounts and found out that it had actually posted with the tags and everything else done correctly.

I don't know what could be causing this. As the Q&A asks, I do have more than 11 posts on Fur Affinity, and I have Ko-Fi gold so that I can post hi-res images. I thought this was a problem with the "Combine with default" feature for tags, but turning that off and adding tags to combine does not solve the issue.

Telegram channel not found

The telegram sender doesn’t work if no message has been sent in the channel for a while, saying that it’s not found.

If I send a message in the channel and restart PostyBirb, it works.

Screenshot_2023-11-11_10-46-52

Image Previews Broken on Linux [Arch Linux x86_64]

In PostyBirb Plus version 3.1.24, I no long get image previews. They all show as broken links.

Screenshot_20230801_173042

I'm not sure what's causing this as the file locations are all correct. During PostyBirb's initialization step, the following error happens:

[Nest] 27339   - 08/01/2023, 5:23:23 PM   [Unhandled Rejection] ERR_FAILED (-2) loading 'file:///tmp/.mount_postybZaGmnA/resources/app.asar/loader/loader.html' +95ms
Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_postybZaGmnA/resources/app.asar/loader/loader.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:161:7647)
    at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:161:8022)
    at EventEmitter.emit (node:events:526:28)
(node:27339) UnhandledPromiseRejectionWarning: Error: ERR_FAILED (-2) loading 'file:///tmp/.mount_postybZaGmnA/resources/app.asar/loader/loader.html'
    at rejectAndCleanup (node:electron/js2c/browser_init:161:7647)
    at EventEmitter.stopLoadingListener (node:electron/js2c/browser_init:161:8022)
    at EventEmitter.emit (node:events:526:28)
(Use `postybirb-plus --trace-warnings ...` to show where the warning was created)
(node:27339) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
App suspension blocker: enabled (0)
[27382:0801/172324.188310:ERROR:gl_utils.cc(319)] [.WebGL-0x3a740036bf00]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
[Nest] 27339   - 08/01/2023, 5:23:28 PM   [UpdateService] Checking for update...
[27339:0801/172339.107728:ERROR:cert_verify_proc_builtin.cc(681)] CertVerifyProcBuiltin for localhost failed:

Mirror/import from gallery

Hey there, not sure if this is within scope or postybirb, but I'm seeing a lot of folks who want to move their art gallery from one site to another (or to multiple others) lately, and wondering if this is something postybirb could support, or make easier?

I wonder whether you could just import posts and metadata json from a gallery-dl dump, for instance? That would save you from having to write scraping code

Mastodon service should support /api/v2/instance "max_characters" for length limit

In brief

Details

Enough Mastodon instances have customized the maximum post length beyond the 500 character default that upstream vanilla Mastodon supports a configuration:statuses:max_characters field to tell clients what the length limit is.

GET /api/v2/instance

…leads to…

{
  "configuration": {
    "statuses": {
      "max_characters": 500
    }
  }
}

Trimmed response, much more detail is provided

For example, mastodon.social provides this configuration, whereas another instance with customized limits (vulpine.club) provides this configuration.

This can be easily verified in Bash via…

$ curl --silent "https://mastodon.social/api/v2/instance" | jq ".configuration.statuses.max_characters"
500
$ curl --silent "https://vulpine.club/api/v2/instance" | jq ".configuration.statuses.max_characters"
1312

Rationale

Mastodon requires hashtags for posts to be searchable.

By providing more characters to folks on instances that support it, this allows artists to better manage their description and include more relevant hashtags at the end of the post (instead of #needing to #intermingle them #with words #like this).

Patreon: No CSRF Token found.

Been getting this error for a few days now and I can't figure out what to do
I tried logging out and back in and even deleting and re-adding the account, all posts fail with "Patreon: No CSRF Token found."

Twitter Login API broken

Cannot add a twitter account to PostyBirb. Clicking "Login" results in a page which states "A problem occurred when attempting to contact the authentication server." And seems to ask for a manual Authentication PIN.

image

On inspection of the related code, the login flow appears to depend on a custom auth server, which returns an error when authorizing.

image

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.