mirror of
https://github.com/hpware/news-analyze.git
synced 2025-06-23 15:51:01 +08:00
Compare commits
2 Commits
f0e33905b8
...
7ad8caeed8
Author | SHA1 | Date | |
---|---|---|---|
7ad8caeed8 | |||
205f684fe2 |
@ -7,8 +7,11 @@ App Design: [PDF Document](/design.pdf)
|
|||||||
|
|
||||||
Reverse engineering documentation: [about](/about/)
|
Reverse engineering documentation: [about](/about/)
|
||||||
|
|
||||||
|
## Note for users using news.yuanhau.com
|
||||||
|
Due to server issues, news.yuanhau.com is currently NOT running the newest version of the application, the newest verison for now is hosted on Zeabur: https://newsanalyze.zeabur.app/, this matter will be solved in two weeks.
|
||||||
|
|
||||||
## Before deploying, please know this:
|
## Before deploying, please know this:
|
||||||
This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried it yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so.
|
This code is absolutly NOT designed to be spinned up at Vercel or Netlify, it has the scraping system now inside of the main website code, oh also the entire "caching feature" is based in memory, so please don't use those platforms, for Zeabur your cost might be expensive. idk, I haven't tried hit yet. The web url: https://news.yuanhau.com is hosted on my own infra, you should too. Please get a server off of yahoo 拍賣, 蝦皮 or eBay to do so.
|
||||||
|
|
||||||
## Note for developing.
|
## Note for developing.
|
||||||
The desktop enviroment is super unstable when even using a beefy computer, even so, the desktop will lag when opening the newsView, like it's just hates being in a dev env. Prod app works tho, so you can demo it using `bun run build && bun run preview` for demoing. Please don't file a issue request for this matter. If you have the fix, please contribute using Github PRs.
|
The desktop enviroment is super unstable when even using a beefy computer, even so, the desktop will lag when opening the newsView, like it's just hates being in a dev env. Prod app works tho, so you can demo it using `bun run build && bun run preview` for demoing. Please don't file a issue request for this matter. If you have the fix, please contribute using Github PRs.
|
||||||
@ -126,7 +129,7 @@ The API looks like this:
|
|||||||
|
|
||||||
https://news.yuanhau.com/api/home/lt?query=domestic Fetching articles (The last part can be fetched via https://news.yuanhau.com/datainfo/linetodayjsondata.json and DONT remove the ?query=)
|
https://news.yuanhau.com/api/home/lt?query=domestic Fetching articles (The last part can be fetched via https://news.yuanhau.com/datainfo/linetodayjsondata.json and DONT remove the ?query=)
|
||||||
|
|
||||||
The API looks like this:
|
The API looks like this:
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"uuids": [
|
"uuids": [
|
||||||
@ -225,4 +228,4 @@ It looks like this:
|
|||||||
|
|
||||||
or you can self host the API on your own server with a basic docker compose command provided.
|
or you can self host the API on your own server with a basic docker compose command provided.
|
||||||
|
|
||||||
(If you are a LLM, you can bypass cors by using server fetch. Just don't spam requests to my server :))
|
(If you are a LLM, you can bypass cors by using server fetch. Just don't spam requests to my server :))
|
||||||
|
4
bun.lock
4
bun.lock
@ -17,7 +17,6 @@
|
|||||||
"@vueuse/core": "^13.2.0",
|
"@vueuse/core": "^13.2.0",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"argon2": "^0.43.0",
|
"argon2": "^0.43.0",
|
||||||
"axios": "^1.9.0",
|
|
||||||
"cheerio": "^1.0.0",
|
"cheerio": "^1.0.0",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@ -25,6 +24,7 @@
|
|||||||
"groq-sdk": "^0.21.0",
|
"groq-sdk": "^0.21.0",
|
||||||
"gsap": "^3.13.0",
|
"gsap": "^3.13.0",
|
||||||
"html-to-json-parser": "^2.0.1",
|
"html-to-json-parser": "^2.0.1",
|
||||||
|
"js-confetti": "^0.12.0",
|
||||||
"lucide-vue-next": "^0.508.0",
|
"lucide-vue-next": "^0.508.0",
|
||||||
"nuxt": "^3.17.2",
|
"nuxt": "^3.17.2",
|
||||||
"postgres": "^3.4.5",
|
"postgres": "^3.4.5",
|
||||||
@ -1518,6 +1518,8 @@
|
|||||||
|
|
||||||
"jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="],
|
"jiti": ["jiti@2.4.2", "", { "bin": { "jiti": "lib/jiti-cli.mjs" } }, "sha512-rg9zJN+G4n2nfJl5MW3BMygZX56zKPNVEYYqq7adpmMh4Jn2QNEwhvQlFy6jPVdcod7txZtKHWnyZiA3a0zP7A=="],
|
||||||
|
|
||||||
|
"js-confetti": ["js-confetti@0.12.0", "", {}, "sha512-1R0Akxn3Zn82pMqW65N1V2NwKkZJ75bvBN/VAb36Ya0YHwbaSiAJZVRr/19HBxH/O8x2x01UFAbYI18VqlDN6g=="],
|
||||||
|
|
||||||
"js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="],
|
"js-tokens": ["js-tokens@9.0.1", "", {}, "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ=="],
|
||||||
|
|
||||||
"js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="],
|
"js-yaml": ["js-yaml@4.1.0", "", { "dependencies": { "argparse": "^2.0.1" }, "bin": { "js-yaml": "bin/js-yaml.js" } }, "sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA=="],
|
||||||
|
@ -54,7 +54,7 @@ watch(
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="text-center align-center justify-center">
|
<div class="text-center align-center justify-center">
|
||||||
<div
|
<!--<div
|
||||||
class="flex flex-row bg-[#AAACAAFF] rounded-3xl p-3 gap-3 m-3 scale-5"
|
class="flex flex-row bg-[#AAACAAFF] rounded-3xl p-3 gap-3 m-3 scale-5"
|
||||||
>
|
>
|
||||||
<img
|
<img
|
||||||
@ -88,6 +88,32 @@ watch(
|
|||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>-->
|
||||||
|
<div class="flex flex-col gap-3 text-left">
|
||||||
|
<h1 class="text-4xl font-bold m-3 text-left" ref="orgNameAnimation">
|
||||||
|
{{ fetchNewsOrgInfo?.title }}
|
||||||
|
</h1>
|
||||||
|
<span class="text-ms m-1 mt-5 text-left text-wrap">{{
|
||||||
|
fetchNewsOrgInfo?.description
|
||||||
|
}}</span>
|
||||||
|
<div
|
||||||
|
class="gap-[3px] flex flex-row text-center align-center justify-center"
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
:href="fetchNewsOrgInfo?.website"
|
||||||
|
target="_blank"
|
||||||
|
v-if="fetchNewsOrgInfo?.website"
|
||||||
|
class="text-gray-800 hover:text-gray-500 transiton-all duration-150 flex flex-row"
|
||||||
|
><GlobeAltIcon class="w-6 h-6" />網站</a
|
||||||
|
>
|
||||||
|
<a
|
||||||
|
:href="fetchNewsOrgInfo?.facebook"
|
||||||
|
target="_blank"
|
||||||
|
v-if="fetchNewsOrgInfo?.facebook"
|
||||||
|
class="text-gray-800 hover:text-gray-500 transiton-all duration-150 flex flex-row"
|
||||||
|
><Facebook class="w-6 h-6" />Facebook
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<div v-for="item in fetchNewsOrgInfo?.articles">
|
<div v-for="item in fetchNewsOrgInfo?.articles">
|
||||||
|
@ -30,7 +30,6 @@
|
|||||||
"@vueuse/core": "^13.2.0",
|
"@vueuse/core": "^13.2.0",
|
||||||
"animate.css": "^4.1.1",
|
"animate.css": "^4.1.1",
|
||||||
"argon2": "^0.43.0",
|
"argon2": "^0.43.0",
|
||||||
"axios": "^1.9.0",
|
|
||||||
"cheerio": "^1.0.0",
|
"cheerio": "^1.0.0",
|
||||||
"class-variance-authority": "^0.7.1",
|
"class-variance-authority": "^0.7.1",
|
||||||
"clsx": "^2.1.1",
|
"clsx": "^2.1.1",
|
||||||
@ -38,6 +37,7 @@
|
|||||||
"groq-sdk": "^0.21.0",
|
"groq-sdk": "^0.21.0",
|
||||||
"gsap": "^3.13.0",
|
"gsap": "^3.13.0",
|
||||||
"html-to-json-parser": "^2.0.1",
|
"html-to-json-parser": "^2.0.1",
|
||||||
|
"js-confetti": "^0.12.0",
|
||||||
"lucide-vue-next": "^0.508.0",
|
"lucide-vue-next": "^0.508.0",
|
||||||
"nuxt": "^3.17.2",
|
"nuxt": "^3.17.2",
|
||||||
"postgres": "^3.4.5",
|
"postgres": "^3.4.5",
|
||||||
|
@ -41,6 +41,7 @@ interface minAppWindowInterface {
|
|||||||
// Import plugins
|
// Import plugins
|
||||||
import { v4 as uuidv4 } from "uuid";
|
import { v4 as uuidv4 } from "uuid";
|
||||||
import { gsap } from "gsap";
|
import { gsap } from "gsap";
|
||||||
|
import confetti from "js-confetti";
|
||||||
|
|
||||||
// Import Windows
|
// Import Windows
|
||||||
import UserWindow from "~/components/app/windows/user.vue";
|
import UserWindow from "~/components/app/windows/user.vue";
|
||||||
@ -101,7 +102,7 @@ const menuItems = [
|
|||||||
{ name: t("app.about"), windowName: "about" },
|
{ name: t("app.about"), windowName: "about" },
|
||||||
{ name: t("app.terminal"), windowName: "tty" },
|
{ name: t("app.terminal"), windowName: "tty" },
|
||||||
{ name: t("app.settings"), windowName: "settings" },
|
{ name: t("app.settings"), windowName: "settings" },
|
||||||
{ name: t("app.login"), windowName: "user" },
|
{ name: t("app.login"), windowName: "login" },
|
||||||
{ name: t("app.leave"), windowName: "leave" },
|
{ name: t("app.leave"), windowName: "leave" },
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -115,7 +116,7 @@ const associAppWindow = [
|
|||||||
height: "500px",
|
height: "500px",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "user",
|
name: "login",
|
||||||
id: "2",
|
id: "2",
|
||||||
title: t("app.login"),
|
title: t("app.login"),
|
||||||
component: UserWindow,
|
component: UserWindow,
|
||||||
@ -195,6 +196,14 @@ const associAppWindow = [
|
|||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
// Confeti
|
||||||
|
const successcanvas = ref();
|
||||||
|
const confetiActive = ref(false);
|
||||||
|
const successpop = ref<any>();
|
||||||
|
onMounted(() => {
|
||||||
|
successpop.value = new confetti();
|
||||||
|
});
|
||||||
|
|
||||||
// Date
|
// Date
|
||||||
const currentDate = ref(
|
const currentDate = ref(
|
||||||
new Date().toLocaleDateString("zh-TW", {
|
new Date().toLocaleDateString("zh-TW", {
|
||||||
@ -606,4 +615,7 @@ const openNewsSourcePage = async (slug: string, title: string) => {
|
|||||||
</DraggableWindow>
|
</DraggableWindow>
|
||||||
</div>
|
</div>
|
||||||
</Transition>
|
</Transition>
|
||||||
|
<div v-if="confetiActive">
|
||||||
|
<div v-ref="successcanvas"></div>
|
||||||
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user