Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
pdf documentation of qb64
#1
it would be nice to have a pdf documentation of qb64. does it exist?
Reply
#2
I would like a chm version, Pete's favorite Basic compiler converts it's wiki to chm so it's possible
Reply
#3
- In then QB64 program folder "internal\help" you find some explanations.

- Of course a unique file "linked" would be usefull.

- Personally I have a text file in which I write down all the QB64 tips that I discover, and that I find again if necessary. Helpfull !
Why not yes ?
Reply
#4
(04-28-2022, 08:15 PM)Jack Wrote: I would like a chm version, Pete's favorite Basic compiler converts it's wiki to chm so it's possible

yes it would be nice. xchm works perfectly under linux and allows to view this kind of file.

(04-29-2022, 06:33 AM)euklides Wrote: - In then QB64 program folder "internal\help" you find some explanations.

- Of course a unique file "linked" would be usefull.

- Personally I have a text file in which I write down all the QB64 tips that I discover, and that I find again if necessary. Helpfull !

I do the same thing for different linux trick commands and also now for qb64. but well, the pdf or chm format, it would be more convenient.
Reply
#5
(04-28-2022, 08:15 PM)Jack Wrote: I would like a chm version, Pete's favorite Basic compiler converts it's wiki to chm so it's possible

Do you have a link. I might be interested to know how he did it...
Reply
#6
Coolman, here's the link https://github.com/freebasic/fbc/tree/master/doc/fbdoc
you will also need Microsoft HTML Help generator, it may take some searching to find it
Reply
#7
(04-29-2022, 12:01 PM)Jack Wrote: Coolman, here's the link https://github.com/freebasic/fbc/tree/master/doc/fbdoc
you will also need Microsoft HTML Help generator, it may take some searching to find it

Thank you very much. I will look into it.
Reply
#8
well. i looked. fbdoc is closely linked to freebasic to generate a chm for this language. it would be necessary to modify the source code to adapt it. i don't have the time for the moment. i will look for another solution.
Reply
#9
I hesitate to post this but @SMcNeill had posted something awhile ago about accessing the QB64 Wiki for a copy in case it went down, here is my copy and you will at the very least need to update the address but I found it helpful when I wanted to make a list of QB64 command words both underlined and not but no GL.

So this will help get contents and then you can mod as you see fit?

Code: (Select All)
Const SleepSet = 0 'to sleep between each keyword so we can see them and read them
Const SaveTo = "wiki.txt" '"SCRN:" to display to the screen, or insert a filename to save the list to disk

Screen _NewImage(1024, 720, 256)
Print "DOWNLOAD STARTING"
file$ = "QB64WikiList.txt"
'Increase the 2-second time limit here if you need to.
DownloadRSS "http://qb64.org/wiki/Keyword_Reference_-_Alphabetical", file$, 2
Print "DOWNLOAD FINISHED"
Print


Open file$ For Binary As #1
temp$ = Space$(LOF(1))
Get #1, , temp$
Close #1
l = 0
finish$ = "<div id=" + Chr$(34) + "symbols" + Chr$(34) + "></div>"
finish = InStr(temp$, finish$) 'No need to parse anything after we get down to the symbol section of the wiki page

Open SaveTo For Output As #1


Do
    l = InStr(l, temp$, "<li>")
    If l >= finish Then Exit Do
    If l Then
        l2 = InStr(l + 5, temp$, "</li>"): If l2 = 0 Then l2 = Len(temp$)
        work$ = Mid$(temp$, l + 4, l2 - l - 5)
        li1 = InStr(work$, Chr$(34)): li2 = InStr(li1 + 1, work$, Chr$(34))
        link$ = Mid$(work$, li1 + 1, li2 - li1 - 1)
        If InStr(link$, "&amp") Then link$ = "Page does not exist yet."
        link$ = StripCRLF(link$)
        k1 = InStr(li2 + 1, work$, ">"): k2 = InStr(k1 + 1, work$, "<")
        keyword$ = Mid$(work$, k1 + 1, k2 - k1 - 1)
        keyword$ = StripCRLF(keyword$)
        d = InStr(k2 + 1, work$, "<span"): d1 = InStr(d + 1, work$, ">"): d2 = InStr(d1 + 1, work$, "</span")
        desc$ = Mid$(work$, d1 + 1, d2 - d1 - 1)
        desc$ = StripCRLF(desc$)
        Print #1, keyword$
        Print #1, "         http://qb64.org"; link$
        Print #1, "         "; desc$
        If SleepSet Then Sleep
        l = l2 + 1
    End If
Loop Until l = 0
Close

Sleep
System


Sub DownloadRSS (url$, file$, timelimit)
    link$ = url$
    Dim l As _Integer64, lod As _Integer64

    url2$ = RTrim$(LTrim$(link$))
    url4$ = RTrim$(LTrim$(link$))
    If Left$(UCase$(url2$), 7) = "HTTP://" Then url4$ = Mid$(url2$, 8)
    x = InStr(url4$, "/")
    If x Then url2$ = Left$(url4$, x - 1)
    NewsClient = _OpenClient("TCP/IP:80:" + url2$)
    If NewsClient = 0 Then Exit Sub
    e$ = Chr$(13) + Chr$(10) ' end of line characters
    url3$ = Right$(url4$, Len(url4$) - x + 1)
    x$ = "GET " + url3$ + " HTTP/1.1" + e$
    x$ = x$ + "Host: " + url2$ + e$ + e$
    Put #NewsClient, , x$

    Open file$ For Output As #1: Close #1
    Open file$ For Binary As #1

    t! = Timer ' start time
    head$ = ""
    cont_type$ = ""
    Do
        _Limit 20
        Get #NewsClient, , a$
        If LTrim$(a$) > "" Then Put #1, , a$
    Loop Until Timer > t! + timelimit And timelimit > 0 ' (in seconds)
    Close #NewsClient
    Close #1
End Sub

Function StripCRLF$ (text$)
    'The wiki seems to contain stray CRLF characters at the dangest spots.
    'Why it has them, I don't know, but we need to filter them out so our information will load and display properly.
    li1 = 0
    Do
        li1 = InStr(li1 + 1, text$, Chr$(13) + Chr$(10))
        If li1 Then
            l$ = Left$(text$, li1 - 1)
            r$ = Mid$(text$, li1 + 2)
            text$ = l$ + r$
        End If
    Loop Until li1 = 0

    'Also some of the descriptions and such contain links to different keywords.
    'We want to just strip those links and use a normal word replacement for ease of display, since we're not going to be displaying in
    'an html editor/viewer.

    li1 = 0
    Do
        li1 = InStr(li1 + 1, text$, "<a href")
        If li1 Then
            li2 = InStr(li1 + 1, text$, "</a>")
            li3 = InStr(li1 + 1, text$, ">")
            l$ = Left$(text$, li1 - 1)
            m$ = Mid$(text$, li3 + 1, li2 - li3 - 1)
            r$ = Mid$(text$, li2 + 4)
            text$ = l$ + m$ + r$
        End If
    Loop Until li1 = 0

    StripCRLF$ = text$
End Function
Reply
#10
I got rid of the fragmented unwanted auto-mention tags for you.

Pete
Reply




Users browsing this thread: 1 Guest(s)