From 20c9a3962f4afef5e20abf3dfdcd36ab3dafc6bc Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 23 Aug 2025 18:13:39 +0200 Subject: [PATCH 1/3] updated readme and fixed pvv ascii logo --- README.md | 8 ++-- static/ascii_art/pvv_logo.txt | 90 +++++++++++++++++------------------ 2 files changed, 49 insertions(+), 49 deletions(-) diff --git a/README.md b/README.md index 8a43aca..1e3cfdb 100644 --- a/README.md +++ b/README.md @@ -28,12 +28,12 @@ $(go env GOPATH)/bin/air -c .air.toml # Tasks - [ ] Interface for adding new images +- [ ] Add support for webassembly - [ ] ATB integration - [ ] ASCII ART support -- [ ] show more spicy images after kl 22:00 -- [ ] Hide mouse cursor -- [ ] more images and memes??? - +- [ ] Show more spicy images after kl 22:00 +- [ ] Hide mouse cursor (do this though linux) +- [ ] More images and memes??? # NB!!!! Changes in the static directory will not rebuild the project, simple workaround is to just make a small change in main.go and save, for example adding a space diff --git a/static/ascii_art/pvv_logo.txt b/static/ascii_art/pvv_logo.txt index e8ef6c3..2439217 100644 --- a/static/ascii_art/pvv_logo.txt +++ b/static/ascii_art/pvv_logo.txt @@ -1,45 +1,45 @@ - - - - ''''''''''''''''''''''''''''''''''''' - .1!!!!!!!!!!!1?ab?!!1aba?!!!!!!!!!!!1; - ,!'''''''''=!!;+=.''.,=:!!;,'''''''',! - ,! ,!!+' .:!:' ,! - ,! :!+ .:!= ,! - ,! ';;' ,!+ ,! - ,! '??;!;;!!;;;;;;;;;;;;;+;;+!: ,! - ,! ';a=:!,,;!,,,,,,=!!!!+?!==!=!+ +! - ,! :;!'+; +: .1++;:!. ,!=!,.1: - ,! =!.!'+; :: .! +:!. ::=!.1: - ,! !='!'+; :: .!' +:!. +: ;:=! - ,!+; '!'+; :: .!' +:!. +: .!=! - ,!!= '!'+; :: .!' +:!. +: ;;! - ,1!' '!'+; :: .!' +:!. +: ,1! - ,a: '!'+; :: .!' +:!. +: '11 - ,b= '!.+;'':;'.....,1!!1:!. +: !? - ,b. '!..;!!1?!!!!!!!!111!; +: :a - ,?' '!.';!!!!!!!!!!!!!!!!;;;+ +: =? - ,! '!.=!,================,=!'+: ,! - ,! '!'+; '!'+: ,! - ,! '!'+; '!'+: ,! - ,?' '!'+; .,,' '' '''' '' '!'+: =? - ,b. '!'+; d00e,ba d!ab c? '!'+: :a - ,b= '!'+; fd10;ed g?cf fc '!'+: !? - ,a: '!'+; fd10;bg;0:?0:01 '!'+: '11 - ,1!' '!'+; f$0e,+0ff ,gfg. '!'+: ,1! - ,!!= '!'+; fb.' e@? c@b '!'+: ;;! - ,!+; '!'+; d? 1f= ;g: '!'+: .!=! - ,! !='!'+; ,. ', ',' '!'+: ;:,! - ,! =!.!=:; '!=::=!',! - ,! :;??a; '?1a;!, ,! - ,! ';baa1=++===============+a?ba+ ,! - ,! '?a!1!!!!!!!!!!!!!!!!!!!1!a; ,! - ,! ';;' ,!+ ,! - ,! :!+ .:!= ,! - ,! ,!!+' .:!:' ,! - ,!'''''''''=;?1+=.''.,=;?1;,'''''''',! - .1!!!!!!!!!!!1?bb?!!1aba11!!!!!!!!!!1; - ''''''''''''' ''''''''' ''''''''''''' - - - + + + + '''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''' + ..11!!!!!!!!!!!!!!!!!!!!!!11??aabb??!!!!11aabbaa??!!!!!!!!!!!!!!!!!!!!!!11;; + ,,!!''''''''''''''''''==!!!!;;++==..''''..,,==::!!!!;;,,'''''''''''''''',,!! + ,,!! ,,!!!!++'' ..::!!::'' ,,!! + ,,!! ::!!++ ..::!!== ,,!! + ,,!! '';;;;'' ,,!!++ ,,!! + ,,!! ''????;;!!;;;;!!!!;;;;;;;;;;;;;;;;;;;;;;;;;;++;;;;++!!:: ,,!! + ,,!! '';;aa==::!!,,,,;;!!,,,,,,,,,,,,==!!!!!!!!++??!!====!!==!!++ ++!! + ,,!! ::;;!!''++;; ++:: ..11++++;;::!!.. ,,!!==!!,,..11:: + ,,!! ==!!..!!''++;; :::: ..!! ++::!!.. ::::==!!..11:: + ,,!! !!==''!!''++;; :::: ..!!'' ++::!!.. ++:: ;;::==!! + ,,!!++;; ''!!''++;; :::: ..!!'' ++::!!.. ++:: ..!!==!! + ,,!!!!== ''!!''++;; :::: ..!!'' ++::!!.. ++:: ;;;;!! + ,,11!!'' ''!!''++;; :::: ..!!'' ++::!!.. ++:: ,,11!! + ,,aa:: ''!!''++;; :::: ..!!'' ++::!!.. ++:: ''1111 + ,,bb== ''!!..++;;''''::;;''..........,,11!!!!11::!!.. ++:: !!?? + ,,bb.. ''!!....;;!!!!11??!!!!!!!!!!!!!!!!111111!!;; ++:: ::aa + ,,??'' ''!!..'';;!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!;;;;;;++ ++:: ==?? + ,,!! ''!!..==!!,,================================,,==!!''++:: ,,!! + ,,!! ''!!''++;; ''!!''++:: ,,!! + ,,!! ''!!''++;; ''!!''++:: ,,!! + ,,??'' ''!!''++;; ..,,,,'' '''' '''''''' '''' ''!!''++:: ==?? + ,,bb.. ''!!''++;; dd0000ee,,bbaa dd!!aabb cc?? ''!!''++:: ::aa + ,,bb== ''!!''++;; ffdd1100;;eedd gg??ccff ffcc ''!!''++:: !!?? + ,,aa:: ''!!''++;; ffdd1100;;bbgg;;00::??00::0011 ''!!''++:: ''1111 + ,,11!!'' ''!!''++;; ff$$00ee,,++00ffff ,,ggffgg.. ''!!''++:: ,,11!! + ,,!!!!== ''!!''++;; ffbb..'' ee@@?? cc@@bb ''!!''++:: ;;;;!! + ,,!!++;; ''!!''++;; dd?? 11ff== ;;gg:: ''!!''++:: ..!!==!! + ,,!! !!==''!!''++;; ,,.. '',, '',,'' ''!!''++:: ;;::,,!! + ,,!! ==!!..!!==::;; ''!!==::::==!!'',,!! + ,,!! ::;;????aa;; ''??11aa;;!!,, ,,!! + ,,!! '';;bbaaaa11==++++==============================++aa??bbaa++ ,,!! + ,,!! ''??aa!!11!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!11!!aa;; ,,!! + ,,!! '';;;;'' ,,!!++ ,,!! + ,,!! ::!!++ ..::!!== ,,!! + ,,!! ,,!!!!++'' ..::!!::'' ,,!! + ,,!!''''''''''''''''''==;;??11++==..''''..,,==;;??11;;,,'''''''''''''''',,!! + ..11!!!!!!!!!!!!!!!!!!!!!!11??bbbb??!!!!11aabbaa1111!!!!!!!!!!!!!!!!!!!!11;; + '''''''''''''''''''''''''' '''''''''''''''''' '''''''''''''''''''''''''' + + + From 97286fb3f1602a3265a69a067f36030d5bf83824 Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 23 Aug 2025 19:17:20 +0200 Subject: [PATCH 2/3] changed to PascalCase --- main.go | 14 ++------------ file_handlers.go => src/FileHandlers.go | 15 +++++++++++++-- 2 files changed, 15 insertions(+), 14 deletions(-) rename file_handlers.go => src/FileHandlers.go (85%) diff --git a/main.go b/main.go index 4c3c743..22c730c 100644 --- a/main.go +++ b/main.go @@ -1,22 +1,12 @@ package main import ( + "Advertisement_Panel/src" "fmt" "html/template" "net/http" ) -type FileData struct { - ImageNames []string - SpicyImageNames []string - AsciiFiles []AsciiEntry -} - -type AsciiEntry struct { - Name string - FontSize int -} - var templ *template.Template func main() { @@ -27,7 +17,7 @@ func main() { http.HandleFunc("/", index_handler) // Serves json for html to find file names - http.HandleFunc("/files", file_handler) + http.HandleFunc("/files", src.FileHandler) // Serves ascii page http.HandleFunc("/ascii", ascii_handler) diff --git a/file_handlers.go b/src/FileHandlers.go similarity index 85% rename from file_handlers.go rename to src/FileHandlers.go index d593d0e..382c3a5 100644 --- a/file_handlers.go +++ b/src/FileHandlers.go @@ -1,4 +1,4 @@ -package main +package src import ( "encoding/json" @@ -10,8 +10,19 @@ import ( const staticDir = "static" +type FileData struct { + ImageNames []string + SpicyImageNames []string + AsciiFiles []AsciiEntry +} + +type AsciiEntry struct { + Name string + FontSize int +} + // move FileData and AsciiEntry here if you want, or leave in main.go -func file_handler(w http.ResponseWriter, r *http.Request) { +func FileHandler(w http.ResponseWriter, r *http.Request) { data := FileData{ ImageNames: []string{}, SpicyImageNames: []string{}, From f8463d9bd8c85a7f29ee204deafb8d178a01f627 Mon Sep 17 00:00:00 2001 From: Albert Date: Sat, 23 Aug 2025 19:38:56 +0200 Subject: [PATCH 3/3] added some more task --- README.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 1e3cfdb..09689c2 100644 --- a/README.md +++ b/README.md @@ -27,10 +27,12 @@ $(go env GOPATH)/bin/air -c .air.toml # Tasks -- [ ] Interface for adding new images -- [ ] Add support for webassembly +- [<]  Interface for adding new images +- [x] ASCII ART support +- [ ] some sort of auth +- [ ] Change image system to database +- [ ] Add support for user inputed webassembly - [ ] ATB integration -- [ ] ASCII ART support - [ ] Show more spicy images after kl 22:00 - [ ] Hide mouse cursor (do this though linux) - [ ] More images and memes???