this post was submitted on 03 Aug 2024
5 points (100.0% liked)

Perchance - Create a Random Text Generator

484 readers
6 users here now

โš„๏ธŽ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.

2. Be kind and friendly.

  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)

3. Be thankful to those who try to help you.

  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)

4. Only post about stuff related to perchance.

  • Please only post about perchance related stuff like generators on it, bugs, and the site.

5. Refrain from requesting Prompts for the AI Tools.

  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

6. Search through the Community Before Posting.

  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

founded 2 years ago
MODERATORS
 

Haven't been posting in this community for a while, but I'm here just to share a tip (I think there hasn't been anybody asking for this here yet) that someone on Discord has suggested on. This only works on computers with developer tools though, and I think you could do this in Firefox too.

Here's how to do it:

  1. In https://perchance.org/upload, open DevTools Console (Ctrl+Shift+I > Console tab) and then select "embed" in the dropdown at the top of the console:

  1. And then type in localStorage.previouslyUploadedFiles. It'll then give you a JSON of the upload list that you can copy the given string provided to a text file and transfer it to another computer you'd want to access the uploads for.

  1. Right click and select "Copy string contents" ("Copy Message" in Firefox). Then, paste it into a text file somewhere that you can transfer through a media like a USB to be transferred into the other computer.

  2. In another computer, repeat the first two steps above, and then write this:

localStorage.previouslyUploadedFiles = [upload list content from the text file]
  1. Replace the [upload list content from the text file] part with the contents from the text file you've just transferred, and then hit Enter. This will magically set the upload list to the one you have in your primary computer.

And that's it! The upload list isn't synced though, but at least could be useful for keeping stuff in. Feel free to add something missing here if you like! ๐Ÿ˜Š

you are viewing a single comment's thread
view the rest of the comments
[โ€“] [email protected] 1 points 4 months ago

Could do--though potentially it would be too long a URL to work in (some) browsers?

The way I did it with my bookmarklet was: (pseudo-code)

if (not at the right place) { open new tab to right place }
else { do the thing }

...And give the user alerts before each thing happens so they understand what to do, and they need to re-run the bookmarklet on the new page, etc.

So your bookmarklet could be:

if (not at the right place) { open new tab to right place }
else {
  while (prompt to type "export" or "import" or cancel) {
    if ("export") { prompt with generated JSON to be copied, with instructions on how to import; break; }
    else if ("import") { prompt asking for generated JSON to be pasted in; set localStorage; alert "import complete"; break; }
  }
  // if they cancelled or gave an empty string, the loop is skipped
  // if they gave "import" or "export", loop exits
  // if they gave invalid input, loops and re-asks
}

I hope that made sense ๐Ÿ˜