Code Monkey home page Code Monkey logo

wp-dm-export's Introduction

Wattpad DM Export [Link]


Wattpad is deleting all DMs on May 6th 2024. This WebApp implements an export solution.

Export here. Join the discord!

Home:

User Selection:

Exported HTML (JSON also available):

HTML Rendering could be improved, but the JSON Export works without issue. Authentication data is cached for 24 hours to prevent ratelimits. I've tried to make this very easy to self-host, so please do.

If you need support, join the discord!

Stars ⭐ are appreciated. Thanks!

Self Hosting Guide

  1. Clone the repository: git clone https://github.com/TheOnlyWayUp/WP-DM-Export && cd WP-DM-Export
  2. Build the image: docker build . -t 'wp_dm_export' (This takes about 2 Minutes)
  3. Run the Container: docker run -d -p 5043:80 wp_dm_export

That's it! You can use your instance at http://localhost:5043. API Documentation is available at http://localhost:5043/docs.

Contributing

If you're interested in helping, I'd really appreciate PRs improving HTML Rendering. This is being tracked in #2.


My other projects:

  • WattpadDownloader: Visit here. Download Wattpad books as EPUBs in seconds!
  • Wattpad-Py: Visit here. Python package to interface with Wattpad's Data API.

TheOnlyWayUp © 2024

wp-dm-export's People

Contributors

imgbotapp avatar theonlywayup avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar

wp-dm-export's Issues

Improve HTML Rendering

function generate_html(username) {
let tailwind_import = '<script src="https://cdn.tailwindcss.com"></' + 'script' + '>';
let template = `<html>
<head>
<title>Conversation with ${username}</title>
${tailwind_import}
</head>
<body class="bg-slate-300">`;
let sent = `
<div class="w-screen my-3 place-items-end grid">
<div class="grid-cols-2 grid w-fit place-items-center">
<div class="flex flex-col text-right max-w-md">
<p class="text-slate-650 ">{username}</p>
<p class="bg-slate-100 p-2 rounded-lg max-w-md text-wrap rounded-tr-none ">{content}</p>
<p class="text-slate-500">{date}</p>
</div>
<img src="{avatar}" alt="{username}'s Display Picture" class="rounded-full w-[48px] h-[48px]">
</div>`;
let received = `
<div class="w-screen my-3">
<div class="grid-cols-2 grid w-fit place-items-center">
<img src="{avatar}" alt="{username}'s Display Picture" class="rounded-full w-[48px] h-[48px]">
<div class="flex flex-col max-w-md">
<p class="text-slate-650">{username}</p>
<p class="bg-slate-100 p-2 rounded-lg max-w-md text-wrap rounded-tl-none">{content}</p>
<p class="text-slate-500">{date}</p>
</div>
</div>
`;
let end = `</body>
</html>`;
let content = '';
let data = responses[username][0];
let messages = [];
data.forEach((api_data) => {
api_data.forEach((message) => {
messages.push(message);
});
});
content = content + template;
messages.reverse().forEach((message) => {
if (message.from.name.toLowerCase() == username.toLowerCase()) {
content =
content +
received
.replaceAll('{username}', message.from.name)
.replaceAll('{content}', message.body)
.replaceAll('{date}', message.createDate)
.replaceAll('{avatar}', message.from.avatar);
} else {
content =
content +
sent
.replaceAll('{username}', message.from.name)
.replaceAll('{content}', message.body)
.replaceAll('{date}', message.createDate)
.replaceAll('{avatar}', message.from.avatar);
}
});
content = content + end;
return content;
}

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.